/*============================================================================
 PROJECT: Kleii
 FILE:    MKAssetView.m
 AUTHOR:  Khoai Nguyen Minh
 DATE:    12/21/13
 =============================================================================*/

/*============================================================================
 IMPORT
 =============================================================================*/
#import "MKAssetView.h"

/*============================================================================
 PRIVATE MACRO
 =============================================================================*/
/*============================================================================
 PRIVATE INTERFACE
 =============================================================================*/

@interface MKAssetView()
@end

@implementation MKAssetView

- (id)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    self.callback = nil;
}

- (IBAction)didTouchedOnSelectButton:(UIButton *)sender {
    sender.selected = !sender.selected;
    self.overlayView.hidden = !sender.selected;
    self.checkedMarkImageView.hidden = !sender.selected;
    
    if(self.callback) {
        self.callback(self);
    }
}

@end
